<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="initial-scale=1.0" />
  <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta name="format-detection" content="telephone=no" />
  <title>验证审核</title>
  <link rel="stylesheet" href="../../css/reset.css" />
  <style>
    body {
      width: 100%;
      background-color: #fff;
      font-size: 0.26rem;
      height: auto;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      font-family: Helvetica;
      color: rgba(24, 24, 24, 0.65);
    }

    .checkstate {
      width: 100%;
      height: 3.74rem;
      display: flex;
      display: -webkit-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .checkstate img {
      width: 1.75rem;
      height: 2.07rem;
      margin-bottom: 0.2rem;
    }

    .iddetail ul {
      width: 100%;
      height: auto;
      display: flex;
      display: -webkit-flex;
      flex-direction: column;
      padding: 0 0 0 0.24rem;
      box-sizing: border-box;
      color: #adadad;
    }

    .iddetail ul>li {
      display: flex;
      display: -webkit-flex;
      height: 0.9rem;
      border-bottom: 1px solid #e5e5e5;
      align-items: center;
      justify-content: space-between;
      padding-right: 0.24rem;
    }

    .flilresone {
      display: block;
      width: 30%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    .reSubmitData {
      outline: none;
      border: none;
      width: 6.9rem;
      height: 0.88rem;
      background: #FFD204;
      border-radius: 0.08rem;
      line-height: 0.88rem;
      text-align: center;
      font-size: 0.3rem;
      color: rgba(39, 39, 39, 0.93);
      margin-left: calc((100% - 6.9rem) / 2);
      margin-top: 0.4rem;
    }
  </style>
</head>

<body>
  <div class="checkstate">
    <img id="statusUrl" src="../../image/renzhenginx.png" />
    <p class="status">证件审核中，请耐心等待</p>
  </div>
  <div class="iddetail">
    <ul>
      <li><span class="showName"> 真实姓名 </span> <span class="userName"> XXX </span></li>
      <li class="hideli">
        <span> 证件号码 </span>
        <span class="userNumber"> **************** </span>
      </li>
      <li class="filleResone" style="min-height: 0.9rem;height: auto;display: none;">
        <span> 失败原因 </span>
        <span class="flilresone"> 证件模糊不清晰 </span>
      </li>
    </ul>
  </div>
  <button class="reSubmitData" style="display: none;">
    重新上传
  </button>
  <script src="../../script/autosize.js"></script>
  <script src="../../script/fastclick.js"></script>
  <script src="../../script/jquery_three_two_one.js"></script>
  <script src="../../script/app.js"></script>
  <script>
    apiready = function () {
      var app = new APP();
      var codeNum = api.pageParam.codeNum;//上一个页面状态码；614 审核未通过
      var failText = api.pageParam.failText || "";//拒绝理由
      if (codeNum == 614) {
        $(".reSubmitData").show();
        $("#statusUrl").attr("src", "../../image/faultximg.png");
        $("#statusUrl").css({ width: "2.27rem", height: "2.07rem" });
        $(".status").text("审核失败").css("color", "#F24343");
        $(".filleResone").show().find(".flilresone").text(failText);
      }
      app.trigger("commit_successful");
      app.handlePage();
      $("input").click(function () {
        $(this).focus().select(); //保险起见，还是加上这句。
      });
      function getIdStatu() {
        var account = app.getAccount();
        app.ajax({
          param: {
            method: "post",
            url: app.ajaxUrl + "member/get-userinfo",
            data: {
              values: {
                token: account.token
              }
            },
            callback: function (ret, err) {
              app.log("auth", "获取认证状态返回：" + JSON.stringify(ret));
              if (ret.code == 200) {
                var data = ret.data.info;
                if (data.status == 0) {
                  $("#statusUrl").attr("src", "../../image/renzhenginx.png");
                  $("#statusUrl").css({ width: "1.75rem", height: "2.07rem" });
                  $(".userNumber").text(data.id_num.slice(0, 4) + "*******" + data.id_num.slice(-4));
                  $(".userName").text(data.name);
                }
                if (data.status == 1) {
                  $("#statusUrl").attr("src", "../../image/renzhengyesx.png");
                  $("#statusUrl").css({ width: "2.27rem", height: "2.07rem" });
                  $(".status").text("已通过审核")
                  $(".userName").text(data.name);
                  if (data.type && data.type == 5) {
                    $(".showName").text("企业名称");
                  }
                  $(".userNumber").text(data.id_num.slice(0, 4) + "*******" + data.id_num.slice(-4));
                }
                if (data.status == -1) {
                  $(".userName").text(data.name);
                  $(".userNumber").text(data.id_num.slice(0, 4) + "*******" + data.id_num.slice(-4));
                }
              }
            }
          },
          extra: {
            isflower: true
          }
        });
      }
      getIdStatu();
      $(".reSubmitData").click(function () {
        var pageData = {
          name: "choosecerfertion",
          subpage: "my/choosecerfertion",
          title: "实名认证",
          param: {
            pageName: "choosecerfertion"
          }
        }
        app.setNavBarAttr(pageData);
      })
      app.headerMap();

    };
  </script>
</body>

</html>